package com.freewater.library.lending.reader.infrastructure.dao;

import com.freewater.library.lending.reader.infrastructure.po.ReaderPo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface ReaderDao extends JpaRepository<ReaderPo, Long> {

    boolean existsByName(String name);

    @Query("SELECT NEXTVAL('ReaderSeq')")
    long nextReaderId();
}
